#pragma once
#include <iostream>

namespace yzw
{
	template <class T>
	struct list_node
	{
	public:
		T _data;
		list_node<T>* _next;
		list_node<T>* _prev;

		list_node(const T& data = ())
			:_data(data)
			,_next(nullptr)
			,_prev(nullptr)
		{}
	};

	struct list_iterator
	{

	};

	template <class T>
	class list
	{
		typedef list_node<T> Node;
	private:
		Node* _head;
		size_t _size;
	public:
		list()
		{
			_head = new Node;
			_head->_next = _head;
			_head->_prev = _head;
			_size = 0;
		}

		void push_back(const T& x)
		{
			Node* newnode = new Node(x);
			Node* tail = new Node();

			tail->_next = newnode;
			newnode->_prev = tail;
			newnode->_next = _head;
			_head->_prev = newnode;
		}
	};
}
